<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
    <link href="https://getbootstrap.com/docs/4.0/examples/signin/signin.css" rel="stylesheet" crossorigin="anonymous"/>
</head>
<body>
    <div class="container">
    <p th:if="${loginError}" class="error">用户名或密码错误</p>
    <form th:action="@{/login}" method="post" class="form-signin">
        <h2 class="form-signin-heading">Please sign in</h2>
        <p>
        <label for="username">Username</label>:
        <input type="text" id="username" name="username"  class="form-control" autofocus="autofocus" required />
        </p>
        <p>
        <label for="password">Password</label>:
        <input type="password" id="password" name="password" class="form-control"  required />
        </p>
        <input lass="btn btn-lg btn-primary btn-block" type="submit" value="Sign in" />
    </form>
    <p><a href="/index" th:href="@{/index}"></a></p>
    </div>
</body>
</html>